package com.dongdong.controller;

import cn.hutool.core.util.StrUtil;
import com.dongdong.model.TAdmin;
import com.dongdong.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("admin")
public class AdminController {
    @Autowired
    private AdminService adminService;


    @GetMapping("selectAdminByUsername")
    public TAdmin selectAdminByUsername(@RequestParam String username) {
        if (StrUtil.isEmpty(username)) {
            return null;
        }
    return adminService.selectAdminByUsername(username);
    }



}
